1 Transects

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

2 Interactions

3 Phylogeny

4 Traits

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

4.0.1 Total Flowers

4.1 Peak date

As range

4.2 Infer absences

4.3 Species elevation ranges

4.4 Data Matrix

4.5 Species by transect matrix

5 Count model of species phenology

## sink("model/threshold_baseline.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
## 
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] 
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[PredPlant[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
## 
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3528
##    Total graph size: 17668
## 
## Initializing model

6 Get Chains

6.0.1 Evaluate convergence

6.0.2 Posterior estimates

7 Phylogeny

7.1 Attraction

## sink("model/threshold_attraction.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
## 
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=inverse(vCov*gamma)
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma =1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30649
## 
## Initializing model

8 Get Chains

8.0.1 Evaluate convergence

8.0.2 Posterior estimates

Mean phylogenetic covariance

8.1 Decay in phylogenetic attraction

8.2 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma = 1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30648
## 
## Initializing model

9 Get Chains

9.0.1 Evaluate convergence

9.0.2 Posterior estimates

Mean phylogenetic covariance martix

9.1 Decay in phylogenetic repulsion

10 Traits

10.1 Trait Attraction

## sink("model/threshold_attraction.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
## 
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=inverse(vCov*gamma)
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma =1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30805
## 
## Initializing model

11 Get Chains

11.0.1 Evaluate convergence

11.0.2 Posterior estimates

11.1 Decay in trait attraction

11.2 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma = 1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30804
## 
## Initializing model

12 Get Chains

12.0.1 Evaluate convergence

12.0.2 Posterior estimates

12.1 Decay in trait repulsion

13 Interaction

13.1 Attraction

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma = 1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30804
## 
## Initializing model

13.1.1 Evaluate convergence

13.1.2 Posterior estimates

Mean interaction covariance

13.2 Decay in interaction attraction

13.3 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma = 1
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3601
##    Total graph size: 30804
## 
## Initializing model

14 Get Chains

14.0.1 Evaluate convergence

14.0.2 Posterior estimates

Mean interaction covariance martix

14.1 Decay in interaction repulsion

15 Model Comparison

15.1 Alpha

The probability of occurrence.

15.2 E: The effect of autocorrelation on mean flowering intensity

15.3 Omega: The magnitude of the effect of autocorrelation on mean flowering occurrence

15.4 Gamma: The variance of the effect of autocorrelation on mean flowering occurrence

15.5 Decay in autocorrelation effect

16 Model Fit

16.1 Bayesian pvalue

## # A tibble: 6 x 2
##   Model                       p
##   <chr>                   <dbl>
## 1 interaction_attraction  0.972
## 2 interaction_repulsion   0.978
## 3 phylogenetic_attraction 1    
## 4 phylogenetic_repulsion  0.842
## 5 trait_attraction        0.998
## 6 trait_repulsion         0.898

16.2 Overall

Model mean lower upper
phylogenetic_attraction 0.3089702 0.3026004 0.3156451
trait_attraction 0.3069978 0.3004839 0.3131989
interaction_repulsion 0.2645273 0.2175046 0.2989389
interaction_attraction 0.2619161 0.2153529 0.2981767
trait_repulsion 0.2133658 0.2002010 0.2245696
phylogenetic_repulsion 0.1957866 0.1869294 0.2052489

16.2.1 Without baseline

16.3 By Species

Without baseline

Zoom in

17 Prediction

17.0.1 Tables

Model mean lower upper
baseline 0.3637339 0.3374650 0.3907563
phylogenetic_attraction 0.3223838 0.2955182 0.3501401
trait_attraction 0.3203894 0.2941176 0.3487395
interaction_repulsion 0.2919748 0.2534314 0.3291317
interaction_attraction 0.2905602 0.2520308 0.3319328
trait_repulsion 0.2652941 0.2436975 0.2899160
phylogenetic_repulsion 0.2501064 0.2282913 0.2731793